<?php
/**
 * DefaultApiTest
 * PHP version 8.3
 *
 * @category Class
 * @package  SpApi
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * Selling Partner API for Finances
 *
 * The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
 *
 * The version of the OpenAPI document: v0
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.9.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Please update the test case below to test the endpoint.
 */

namespace SpApi\Test\Api;

use SpApi\ApiException;
use SpApi\Api\finances\v0\DefaultApi;
use SpApi\ObjectSerializer;

/**
 * DefaultApiTest Class Doc Comment
 *
 * @category Class
 * @package  SpApi
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */
class DefaultApiTest extends BaseTestCase
{
    private DefaultApi $apiInstance;
    public function setUp(): void
    {
        parent::setUp();
        // Initialize parameter value specific to case
        $this->testHelper->setSpecificValue('DefaultApi', $this->getName());
        $this->apiInstance = new DefaultApi($this->config, null);
        // Change Time Format if it requires
        $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('DefaultApi');
        if ($specificTimeFormat) {
            ObjectSerializer::setDateTimeFormat($specificTimeFormat);
        }
    }

    /**
     * Test case for listFinancialEventGroups_200
     */
    public function testListFinancialEventGroups200()
    {
        try {
            // Skip test if it is in the skip list
            if ($this->testHelper->shouldSkipTest('testListFinancialEventGroups200', 'DefaultApi')) {
                $this->assertTrue(true);
                return;
            }
            $jsonSchema = '{
  &quot;description&quot; : &quot;Success.&quot;,
  &quot;headers&quot; : {
    &quot;x-amzn-RequestId&quot; : {
      &quot;description&quot; : &quot;Unique request reference identifier.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    },
    &quot;x-amzn-RateLimit-Limit&quot; : {
      &quot;description&quot; : &quot;Your rate limit (requests per second) for this operation.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    }
  },
  &quot;content&quot; : {
    &quot;application/json&quot; : {
      &quot;schema&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/ListFinancialEventGroupsResponse&quot;
      }
    }
  },
  &quot;x-amzn-api-sandbox&quot; : {
    &quot;static&quot; : [ {
      &quot;request&quot; : {
        &quot;parameters&quot; : {
          &quot;MaxResultsPerPage&quot; : {
            &quot;value&quot; : 1
          },
          &quot;FinancialEventGroupStartedBefore&quot; : {
            &quot;value&quot; : &quot;2019-10-31&quot;
          },
          &quot;FinancialEventGroupStartedAfter&quot; : {
            &quot;value&quot; : &quot;2019-10-13&quot;
          }
        }
      },
      &quot;response&quot; : {
        &quot;payload&quot; : {
          &quot;NextToken&quot; : &quot;3493805734095308457308475&quot;,
          &quot;FinancialEventGroupList&quot; : [ {
            &quot;FinancialEventGroupId&quot; : &quot;1&quot;,
            &quot;ProcessingStatus&quot; : &quot;PROCESSED&quot;,
            &quot;FundTransferStatus&quot; : &quot;TRANSFERED&quot;,
            &quot;OriginalTotal&quot; : {
              &quot;CurrencyCode&quot; : &quot;USD&quot;,
              &quot;CurrencyAmount&quot; : 10.34
            },
            &quot;ConvertedTotal&quot; : {
              &quot;CurrencyCode&quot; : &quot;USD&quot;,
              &quot;CurrencyAmount&quot; : 39.43
            },
            &quot;FundTransferDate&quot; : &quot;2020-02-07T14:38:42.128Z&quot;,
            &quot;TraceId&quot; : &quot;34550454504545&quot;,
            &quot;AccountTail&quot; : &quot;4854564857&quot;,
            &quot;BeginningBalance&quot; : {
              &quot;CurrencyCode&quot; : &quot;USD&quot;,
              &quot;CurrencyAmount&quot; : 55.33
            },
            &quot;FinancialEventGroupStart&quot; : &quot;2020-02-07T14:38:42.128Z&quot;,
            &quot;FinancialEventGroupEnd&quot; : &quot;2020-02-07T14:38:42.128Z&quot;
          } ]
        }
      }
    } ]
  }
}';
            $result = $this->testHelper->extractRequestAndResponse(
                $this->apiInstance,
                $jsonSchema,
                'listFinancialEventGroups'
            );
            $requestParams = $result['requestParams'];
            $expectedResponse = $result['expectedResponse'];

            // Change Time Format if it requires
            $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('DefaultApi');
            if ($specificTimeFormat) {
                ObjectSerializer::setDateTimeFormat($specificTimeFormat);
            }

            // Act: Call API
            list($response, $statusCode, $headers) =
                $this->apiInstance->listFinancialEventGroupsWithHttpInfo(...array_values($requestParams));

            // Assert the response code
            $this->assertHttpStatusCode(200, $statusCode);

            // Handle different response codes
            $this->handleResponse($response, $statusCode, 200, $expectedResponse);
        } catch (ApiException $e) {
            $this->handleApiException($e, 200);
        } catch (\ReflectionException $e) {
            $this->fail("Reflection exception: " . $e->getMessage());
        }
    }
    /**
     * Test case for listFinancialEventGroups_400
     */
    public function testListFinancialEventGroups400()
    {
        try {
            // Skip test if it is in the skip list
            if ($this->testHelper->shouldSkipTest('testListFinancialEventGroups400', 'DefaultApi')) {
                $this->assertTrue(true);
                return;
            }
            $jsonSchema = '{
  &quot;description&quot; : &quot;Request has missing or invalid parameters and cannot be parsed.&quot;,
  &quot;headers&quot; : {
    &quot;x-amzn-RequestId&quot; : {
      &quot;description&quot; : &quot;Unique request reference identifier.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    },
    &quot;x-amzn-RateLimit-Limit&quot; : {
      &quot;description&quot; : &quot;Your rate limit (requests per second) for this operation.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    }
  },
  &quot;content&quot; : {
    &quot;application/json&quot; : {
      &quot;schema&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/ListFinancialEventGroupsResponse&quot;
      }
    }
  },
  &quot;x-amzn-api-sandbox&quot; : {
    &quot;static&quot; : [ {
      &quot;request&quot; : {
        &quot;parameters&quot; : {
          &quot;MaxResultsPerPage&quot; : {
            &quot;value&quot; : 10
          }
        }
      },
      &quot;response&quot; : {
        &quot;errors&quot; : [ {
          &quot;code&quot; : &quot;InvalidInput&quot;,
          &quot;message&quot; : &quot;Date range is invalid.&quot;
        } ]
      }
    } ]
  }
}';
            $result = $this->testHelper->extractRequestAndResponse(
                $this->apiInstance,
                $jsonSchema,
                'listFinancialEventGroups'
            );
            $requestParams = $result['requestParams'];
            $expectedResponse = $result['expectedResponse'];

            // Change Time Format if it requires
            $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('DefaultApi');
            if ($specificTimeFormat) {
                ObjectSerializer::setDateTimeFormat($specificTimeFormat);
            }

            // Act: Call API
            list($response, $statusCode, $headers) =
                $this->apiInstance->listFinancialEventGroupsWithHttpInfo(...array_values($requestParams));

            // Assert the response code
            $this->assertHttpStatusCode(400, $statusCode);

            // Handle different response codes
            $this->handleResponse($response, $statusCode, 400, $expectedResponse);
        } catch (ApiException $e) {
            $this->handleApiException($e, 400);
        } catch (\ReflectionException $e) {
            $this->fail("Reflection exception: " . $e->getMessage());
        }
    }
    /**
     * Test case for listFinancialEventGroups_403
     */
    public function testListFinancialEventGroups403()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventGroups_404
     */
    public function testListFinancialEventGroups404()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventGroups_429
     */
    public function testListFinancialEventGroups429()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventGroups_500
     */
    public function testListFinancialEventGroups500()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventGroups_503
     */
    public function testListFinancialEventGroups503()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEvents_200
     */
    public function testListFinancialEvents200()
    {
        try {
            // Skip test if it is in the skip list
            if ($this->testHelper->shouldSkipTest('testListFinancialEvents200', 'DefaultApi')) {
                $this->assertTrue(true);
                return;
            }
            $jsonSchema = '{
  &quot;description&quot; : &quot;Success.&quot;,
  &quot;headers&quot; : {
    &quot;x-amzn-RequestId&quot; : {
      &quot;description&quot; : &quot;Unique request reference identifier.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    },
    &quot;x-amzn-RateLimit-Limit&quot; : {
      &quot;description&quot; : &quot;Your rate limit (requests per second) for this operation.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    }
  },
  &quot;content&quot; : {
    &quot;application/json&quot; : {
      &quot;schema&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/ListFinancialEventsResponse&quot;
      }
    }
  },
  &quot;x-amzn-api-sandbox&quot; : {
    &quot;static&quot; : [ {
      &quot;request&quot; : {
        &quot;parameters&quot; : {
          &quot;MaxResultsPerPage&quot; : {
            &quot;value&quot; : 10
          },
          &quot;NextToken&quot; : {
            &quot;value&quot; : &quot;jehgri34yo7jr9e8f984tr9i4o&quot;
          }
        }
      },
      &quot;response&quot; : {
        &quot;payload&quot; : {
          &quot;NextToken&quot; : &quot;Next token value&quot;,
          &quot;FinancialEvents&quot; : {
            &quot;PayWithAmazonEventList&quot; : [ {
              &quot;SellerOrderId&quot; : &quot;454645645656456&quot;,
              &quot;TransactionPostedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;BusinessObjectType&quot; : &quot;Free&quot;,
              &quot;SalesChannel&quot; : &quot;None&quot;,
              &quot;Charge&quot; : {
                &quot;ChargeType&quot; : &quot;Tax&quot;,
                &quot;ChargeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              },
              &quot;FeeList&quot; : [ {
                &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                &quot;FeeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;PaymentAmountType&quot; : &quot;Tax&quot;,
              &quot;AmountDescription&quot; : &quot;Tax&quot;,
              &quot;FulfillmentChannel&quot; : &quot;FulfillmentChannel&quot;,
              &quot;StoreName&quot; : &quot;Etsy&quot;
            } ],
            &quot;ServiceProviderCreditEventList&quot; : [ {
              &quot;ProviderTransactionType&quot; : &quot;Free&quot;,
              &quot;SellerOrderId&quot; : &quot;454645645656456&quot;,
              &quot;MarketplaceId&quot; : &quot;1&quot;,
              &quot;MarketplaceCountryCode&quot; : &quot;US&quot;,
              &quot;SellerId&quot; : &quot;4564565546&quot;,
              &quot;SellerStoreName&quot; : &quot;Etsy&quot;,
              &quot;ProviderId&quot; : &quot;1&quot;,
              &quot;ProviderStoreName&quot; : &quot;Etsy&quot;,
              &quot;TransactionAmount&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;TransactionCreationDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;
            } ],
            &quot;RentalTransactionEventList&quot; : [ {
              &quot;AmazonOrderId&quot; : &quot;444-555-3343433&quot;,
              &quot;RentalEventType&quot; : &quot;string&quot;,
              &quot;ExtensionLength&quot; : 0,
              &quot;PostedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;RentalChargeList&quot; : [ {
                &quot;ChargeType&quot; : &quot;Tax&quot;,
                &quot;ChargeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;RentalFeeList&quot; : [ {
                &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                &quot;FeeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;MarketplaceName&quot; : &quot;1&quot;,
              &quot;RentalInitialValue&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;RentalReimbursement&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;RentalTaxWithheldList&quot; : [ {
                &quot;TaxCollectionModel&quot; : &quot;Free&quot;,
                &quot;TaxesWithheld&quot; : [ {
                  &quot;ChargeType&quot; : &quot;Tax&quot;,
                  &quot;ChargeAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ]
              } ]
            } ],
            &quot;ProductAdsPaymentEventList&quot; : [ {
              &quot;postedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;transactionType&quot; : &quot;Free&quot;,
              &quot;invoiceId&quot; : &quot;3454535453&quot;,
              &quot;baseValue&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;taxValue&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;transactionValue&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              }
            } ]
          }
        }
      }
    } ]
  }
}';
            $result = $this->testHelper->extractRequestAndResponse(
                $this->apiInstance,
                $jsonSchema,
                'listFinancialEvents'
            );
            $requestParams = $result['requestParams'];
            $expectedResponse = $result['expectedResponse'];

            // Change Time Format if it requires
            $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('DefaultApi');
            if ($specificTimeFormat) {
                ObjectSerializer::setDateTimeFormat($specificTimeFormat);
            }

            // Act: Call API
            list($response, $statusCode, $headers) =
                $this->apiInstance->listFinancialEventsWithHttpInfo(...array_values($requestParams));

            // Assert the response code
            $this->assertHttpStatusCode(200, $statusCode);

            // Handle different response codes
            $this->handleResponse($response, $statusCode, 200, $expectedResponse);
        } catch (ApiException $e) {
            $this->handleApiException($e, 200);
        } catch (\ReflectionException $e) {
            $this->fail("Reflection exception: " . $e->getMessage());
        }
    }
    /**
     * Test case for listFinancialEvents_400
     */
    public function testListFinancialEvents400()
    {
        try {
            // Skip test if it is in the skip list
            if ($this->testHelper->shouldSkipTest('testListFinancialEvents400', 'DefaultApi')) {
                $this->assertTrue(true);
                return;
            }
            $jsonSchema = '{
  &quot;description&quot; : &quot;Request has missing or invalid parameters and cannot be parsed.&quot;,
  &quot;headers&quot; : {
    &quot;x-amzn-RequestId&quot; : {
      &quot;description&quot; : &quot;Unique request reference identifier.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    },
    &quot;x-amzn-RateLimit-Limit&quot; : {
      &quot;description&quot; : &quot;Your rate limit (requests per second) for this operation.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    }
  },
  &quot;content&quot; : {
    &quot;application/json&quot; : {
      &quot;schema&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/ListFinancialEventsResponse&quot;
      }
    }
  },
  &quot;x-amzn-api-sandbox&quot; : {
    &quot;static&quot; : [ {
      &quot;request&quot; : {
        &quot;parameters&quot; : {
          &quot;MaxResultsPerPage&quot; : {
            &quot;value&quot; : 2
          }
        }
      },
      &quot;response&quot; : {
        &quot;errors&quot; : [ {
          &quot;code&quot; : &quot;InvalidInput&quot;,
          &quot;message&quot; : &quot;Input not valid.&quot;
        } ]
      }
    } ]
  }
}';
            $result = $this->testHelper->extractRequestAndResponse(
                $this->apiInstance,
                $jsonSchema,
                'listFinancialEvents'
            );
            $requestParams = $result['requestParams'];
            $expectedResponse = $result['expectedResponse'];

            // Change Time Format if it requires
            $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('DefaultApi');
            if ($specificTimeFormat) {
                ObjectSerializer::setDateTimeFormat($specificTimeFormat);
            }

            // Act: Call API
            list($response, $statusCode, $headers) =
                $this->apiInstance->listFinancialEventsWithHttpInfo(...array_values($requestParams));

            // Assert the response code
            $this->assertHttpStatusCode(400, $statusCode);

            // Handle different response codes
            $this->handleResponse($response, $statusCode, 400, $expectedResponse);
        } catch (ApiException $e) {
            $this->handleApiException($e, 400);
        } catch (\ReflectionException $e) {
            $this->fail("Reflection exception: " . $e->getMessage());
        }
    }
    /**
     * Test case for listFinancialEvents_403
     */
    public function testListFinancialEvents403()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEvents_404
     */
    public function testListFinancialEvents404()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEvents_429
     */
    public function testListFinancialEvents429()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEvents_500
     */
    public function testListFinancialEvents500()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEvents_503
     */
    public function testListFinancialEvents503()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventsByGroupId_200
     */
    public function testListFinancialEventsByGroupId200()
    {
        try {
            // Skip test if it is in the skip list
            if ($this->testHelper->shouldSkipTest('testListFinancialEventsByGroupId200', 'DefaultApi')) {
                $this->assertTrue(true);
                return;
            }
            $jsonSchema = '{
  &quot;description&quot; : &quot;Success.&quot;,
  &quot;headers&quot; : {
    &quot;x-amzn-RequestId&quot; : {
      &quot;description&quot; : &quot;Unique request reference identifier.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    },
    &quot;x-amzn-RateLimit-Limit&quot; : {
      &quot;description&quot; : &quot;Your rate limit (requests per second) for this operation.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    }
  },
  &quot;content&quot; : {
    &quot;application/json&quot; : {
      &quot;schema&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/ListFinancialEventsResponse&quot;
      }
    }
  },
  &quot;x-amzn-api-sandbox&quot; : {
    &quot;static&quot; : [ {
      &quot;request&quot; : {
        &quot;parameters&quot; : {
          &quot;MaxResultsPerPage&quot; : {
            &quot;value&quot; : 10
          },
          &quot;eventGroupId&quot; : {
            &quot;value&quot; : &quot;485734534857&quot;
          }
        }
      },
      &quot;response&quot; : {
        &quot;payload&quot; : {
          &quot;NextToken&quot; : &quot;Next token value&quot;,
          &quot;FinancialEvents&quot; : {
            &quot;ChargebackEventList&quot; : [ {
              &quot;AmazonOrderId&quot; : &quot;444-555-3343433&quot;,
              &quot;SellerOrderId&quot; : &quot;454645645656456&quot;,
              &quot;MarketplaceName&quot; : &quot;1&quot;,
              &quot;OrderChargeList&quot; : [ {
                &quot;ChargeType&quot; : &quot;Tax&quot;,
                &quot;ChargeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;OrderChargeAdjustmentList&quot; : [ {
                &quot;ChargeType&quot; : &quot;Tax&quot;,
                &quot;ChargeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;ShipmentFeeList&quot; : [ {
                &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                &quot;FeeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;ShipmentFeeAdjustmentList&quot; : [ {
                &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                &quot;FeeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;OrderFeeList&quot; : [ {
                &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                &quot;FeeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;OrderFeeAdjustmentList&quot; : [ {
                &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                &quot;FeeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;DirectPaymentList&quot; : [ {
                &quot;DirectPaymentType&quot; : &quot;StoredValueCardRevenue&quot;,
                &quot;DirectPaymentAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;PostedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;ShipmentItemList&quot; : [ {
                &quot;SellerSKU&quot; : &quot;456454455464&quot;,
                &quot;OrderItemId&quot; : &quot;4565465645646&quot;,
                &quot;OrderAdjustmentItemId&quot; : &quot;456456465464&quot;,
                &quot;QuantityShipped&quot; : 0,
                &quot;ItemChargeList&quot; : [ {
                  &quot;ChargeType&quot; : &quot;Tax&quot;,
                  &quot;ChargeAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;ItemChargeAdjustmentList&quot; : [ {
                  &quot;ChargeType&quot; : &quot;Tax&quot;,
                  &quot;ChargeAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;ItemFeeList&quot; : [ {
                  &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                  &quot;FeeAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;ItemFeeAdjustmentList&quot; : [ {
                  &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                  &quot;FeeAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;ItemTaxWithheldList&quot; : [ {
                  &quot;TaxCollectionModel&quot; : &quot;Free&quot;,
                  &quot;TaxesWithheld&quot; : [ {
                    &quot;ChargeType&quot; : &quot;Tax&quot;,
                    &quot;ChargeAmount&quot; : {
                      &quot;CurrencyCode&quot; : &quot;USD&quot;,
                      &quot;CurrencyAmount&quot; : 25.37
                    }
                  } ]
                } ],
                &quot;PromotionList&quot; : [ {
                  &quot;PromotionType&quot; : &quot;Free&quot;,
                  &quot;PromotionId&quot; : &quot;546564565&quot;,
                  &quot;PromotionAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;PromotionAdjustmentList&quot; : [ {
                  &quot;PromotionType&quot; : &quot;Free&quot;,
                  &quot;PromotionId&quot; : &quot;546564565&quot;,
                  &quot;PromotionAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;CostOfPointsGranted&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                },
                &quot;CostOfPointsReturned&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;ShipmentItemAdjustmentList&quot; : [ {
                &quot;SellerSKU&quot; : &quot;456454455464&quot;,
                &quot;OrderItemId&quot; : &quot;4565465645646&quot;,
                &quot;OrderAdjustmentItemId&quot; : &quot;456456465464&quot;,
                &quot;QuantityShipped&quot; : 0,
                &quot;ItemChargeList&quot; : [ {
                  &quot;ChargeType&quot; : &quot;Tax&quot;,
                  &quot;ChargeAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;ItemChargeAdjustmentList&quot; : [ {
                  &quot;ChargeType&quot; : &quot;Tax&quot;,
                  &quot;ChargeAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;ItemFeeList&quot; : [ {
                  &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                  &quot;FeeAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;ItemFeeAdjustmentList&quot; : [ {
                  &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                  &quot;FeeAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;ItemTaxWithheldList&quot; : [ {
                  &quot;TaxCollectionModel&quot; : &quot;Free&quot;,
                  &quot;TaxesWithheld&quot; : [ {
                    &quot;ChargeType&quot; : &quot;Tax&quot;,
                    &quot;ChargeAmount&quot; : {
                      &quot;CurrencyCode&quot; : &quot;USD&quot;,
                      &quot;CurrencyAmount&quot; : 25.37
                    }
                  } ]
                } ],
                &quot;PromotionList&quot; : [ {
                  &quot;PromotionType&quot; : &quot;Free&quot;,
                  &quot;PromotionId&quot; : &quot;546564565&quot;,
                  &quot;PromotionAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;PromotionAdjustmentList&quot; : [ {
                  &quot;PromotionType&quot; : &quot;Free&quot;,
                  &quot;PromotionId&quot; : &quot;546564565&quot;,
                  &quot;PromotionAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ],
                &quot;CostOfPointsGranted&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                },
                &quot;CostOfPointsReturned&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ]
            } ],
            &quot;ImagingServicesFeeEventList&quot; : [ {
              &quot;ImagingRequestBillingItemID&quot; : &quot;456456456&quot;,
              &quot;ASIN&quot; : &quot;4564565456456546456&quot;,
              &quot;PostedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;FeeList&quot; : [ {
                &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                &quot;FeeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ]
            } ],
            &quot;NetworkComminglingTransactionEventList&quot; : [ {
              &quot;TransactionType&quot; : &quot;Free&quot;,
              &quot;PostedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;NetCoTransactionID&quot; : &quot;4565645&quot;,
              &quot;SwapReason&quot; : &quot;None&quot;,
              &quot;ASIN&quot; : &quot;464567656576&quot;,
              &quot;MarketplaceId&quot; : &quot;string&quot;,
              &quot;TaxExclusiveAmount&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;TaxAmount&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              }
            } ],
            &quot;AffordabilityExpenseReversalEventList&quot; : [ {
              &quot;AmazonOrderId&quot; : &quot;444-555-3343433&quot;,
              &quot;PostedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;MarketplaceId&quot; : &quot;1&quot;,
              &quot;TransactionType&quot; : &quot;Free&quot;,
              &quot;BaseExpense&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;TaxTypeCGST&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;TaxTypeSGST&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;TaxTypeIGST&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;TotalExpense&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              }
            } ],
            &quot;TrialShipmentEventList&quot; : [ {
              &quot;AmazonOrderId&quot; : &quot;444-555-3343433&quot;,
              &quot;FinancialEventGroupId&quot; : &quot;1&quot;,
              &quot;PostedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;SKU&quot; : &quot;456454455464&quot;,
              &quot;FeeList&quot; : [ {
                &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                &quot;FeeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ]
            } ],
            &quot;TaxWithholdingEventList&quot; : [ {
              &quot;PostedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;BaseAmount&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;WithheldAmount&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;TaxWithholdingPeriod&quot; : {
                &quot;StartDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
                &quot;EndDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;
              }
            } ]
          }
        }
      }
    } ]
  }
}';
            $result = $this->testHelper->extractRequestAndResponse(
                $this->apiInstance,
                $jsonSchema,
                'listFinancialEventsByGroupId'
            );
            $requestParams = $result['requestParams'];
            $expectedResponse = $result['expectedResponse'];

            // Change Time Format if it requires
            $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('DefaultApi');
            if ($specificTimeFormat) {
                ObjectSerializer::setDateTimeFormat($specificTimeFormat);
            }

            // Act: Call API
            list($response, $statusCode, $headers) =
                $this->apiInstance->listFinancialEventsByGroupIdWithHttpInfo(...array_values($requestParams));

            // Assert the response code
            $this->assertHttpStatusCode(200, $statusCode);

            // Handle different response codes
            $this->handleResponse($response, $statusCode, 200, $expectedResponse);
        } catch (ApiException $e) {
            $this->handleApiException($e, 200);
        } catch (\ReflectionException $e) {
            $this->fail("Reflection exception: " . $e->getMessage());
        }
    }
    /**
     * Test case for listFinancialEventsByGroupId_400
     */
    public function testListFinancialEventsByGroupId400()
    {
        try {
            // Skip test if it is in the skip list
            if ($this->testHelper->shouldSkipTest('testListFinancialEventsByGroupId400', 'DefaultApi')) {
                $this->assertTrue(true);
                return;
            }
            $jsonSchema = '{
  &quot;description&quot; : &quot;Request has missing or invalid parameters and cannot be parsed.&quot;,
  &quot;headers&quot; : {
    &quot;x-amzn-RequestId&quot; : {
      &quot;description&quot; : &quot;Unique request reference identifier.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    },
    &quot;x-amzn-RateLimit-Limit&quot; : {
      &quot;description&quot; : &quot;Your rate limit (requests per second) for this operation.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    }
  },
  &quot;content&quot; : {
    &quot;application/json&quot; : {
      &quot;schema&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/ListFinancialEventsResponse&quot;
      }
    }
  },
  &quot;x-amzn-api-sandbox&quot; : {
    &quot;static&quot; : [ {
      &quot;request&quot; : {
        &quot;parameters&quot; : {
          &quot;eventGroupId&quot; : {
            &quot;value&quot; : &quot;BADID&quot;
          }
        }
      },
      &quot;response&quot; : {
        &quot;errors&quot; : [ {
          &quot;code&quot; : &quot;InvalidInput&quot;,
          &quot;message&quot; : &quot;Bad event group ID provided.&quot;
        } ]
      }
    } ]
  }
}';
            $result = $this->testHelper->extractRequestAndResponse(
                $this->apiInstance,
                $jsonSchema,
                'listFinancialEventsByGroupId'
            );
            $requestParams = $result['requestParams'];
            $expectedResponse = $result['expectedResponse'];

            // Change Time Format if it requires
            $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('DefaultApi');
            if ($specificTimeFormat) {
                ObjectSerializer::setDateTimeFormat($specificTimeFormat);
            }

            // Act: Call API
            list($response, $statusCode, $headers) =
                $this->apiInstance->listFinancialEventsByGroupIdWithHttpInfo(...array_values($requestParams));

            // Assert the response code
            $this->assertHttpStatusCode(400, $statusCode);

            // Handle different response codes
            $this->handleResponse($response, $statusCode, 400, $expectedResponse);
        } catch (ApiException $e) {
            $this->handleApiException($e, 400);
        } catch (\ReflectionException $e) {
            $this->fail("Reflection exception: " . $e->getMessage());
        }
    }
    /**
     * Test case for listFinancialEventsByGroupId_403
     */
    public function testListFinancialEventsByGroupId403()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventsByGroupId_404
     */
    public function testListFinancialEventsByGroupId404()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventsByGroupId_429
     */
    public function testListFinancialEventsByGroupId429()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventsByGroupId_500
     */
    public function testListFinancialEventsByGroupId500()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventsByGroupId_503
     */
    public function testListFinancialEventsByGroupId503()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventsByOrderId_200
     */
    public function testListFinancialEventsByOrderId200()
    {
        try {
            // Skip test if it is in the skip list
            if ($this->testHelper->shouldSkipTest('testListFinancialEventsByOrderId200', 'DefaultApi')) {
                $this->assertTrue(true);
                return;
            }
            $jsonSchema = '{
  &quot;description&quot; : &quot;Financial Events successfully retrieved.&quot;,
  &quot;headers&quot; : {
    &quot;x-amzn-RequestId&quot; : {
      &quot;description&quot; : &quot;Unique request reference identifier.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    },
    &quot;x-amzn-RateLimit-Limit&quot; : {
      &quot;description&quot; : &quot;Your rate limit (requests per second) for this operation.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    }
  },
  &quot;content&quot; : {
    &quot;application/json&quot; : {
      &quot;schema&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/ListFinancialEventsResponse&quot;
      }
    }
  },
  &quot;x-amzn-api-sandbox&quot; : {
    &quot;static&quot; : [ {
      &quot;request&quot; : {
        &quot;parameters&quot; : {
          &quot;MaxResultsPerPage&quot; : {
            &quot;value&quot; : 10
          },
          &quot;orderId&quot; : {
            &quot;value&quot; : &quot;485-734-5434857&quot;
          }
        }
      },
      &quot;response&quot; : {
        &quot;payload&quot; : {
          &quot;NextToken&quot; : &quot;Next token value&quot;,
          &quot;FinancialEvents&quot; : {
            &quot;RetrochargeEventList&quot; : [ {
              &quot;RetrochargeEventType&quot; : &quot;Retrocharge&quot;,
              &quot;AmazonOrderId&quot; : &quot;444-555-3343433&quot;,
              &quot;PostedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;BaseTax&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;ShippingTax&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;MarketplaceName&quot; : &quot;1&quot;,
              &quot;RetrochargeTaxWithheldList&quot; : [ {
                &quot;TaxCollectionModel&quot; : &quot;Free&quot;,
                &quot;TaxesWithheld&quot; : [ {
                  &quot;ChargeType&quot; : &quot;Tax&quot;,
                  &quot;ChargeAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ]
              } ]
            } ],
            &quot;RentalTransactionEventList&quot; : [ {
              &quot;AmazonOrderId&quot; : &quot;444-555-3343433&quot;,
              &quot;RentalEventType&quot; : &quot;string&quot;,
              &quot;ExtensionLength&quot; : 0,
              &quot;PostedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;RentalChargeList&quot; : [ {
                &quot;ChargeType&quot; : &quot;Tax&quot;,
                &quot;ChargeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;RentalFeeList&quot; : [ {
                &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                &quot;FeeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;MarketplaceName&quot; : &quot;1&quot;,
              &quot;RentalInitialValue&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;RentalReimbursement&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;RentalTaxWithheldList&quot; : [ {
                &quot;TaxCollectionModel&quot; : &quot;Free&quot;,
                &quot;TaxesWithheld&quot; : [ {
                  &quot;ChargeType&quot; : &quot;Tax&quot;,
                  &quot;ChargeAmount&quot; : {
                    &quot;CurrencyCode&quot; : &quot;USD&quot;,
                    &quot;CurrencyAmount&quot; : 25.37
                  }
                } ]
              } ]
            } ],
            &quot;ProductAdsPaymentEventList&quot; : [ {
              &quot;postedDate&quot; : &quot;2020-02-05T13:56:00.363Z&quot;,
              &quot;transactionType&quot; : &quot;Free&quot;,
              &quot;invoiceId&quot; : &quot;3454535453&quot;,
              &quot;baseValue&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;taxValue&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              },
              &quot;transactionValue&quot; : {
                &quot;CurrencyCode&quot; : &quot;USD&quot;,
                &quot;CurrencyAmount&quot; : 25.37
              }
            } ],
            &quot;ServiceFeeEventList&quot; : [ {
              &quot;AmazonOrderId&quot; : &quot;444-555-3343433&quot;,
              &quot;FeeReason&quot; : &quot;Free&quot;,
              &quot;FeeList&quot; : [ {
                &quot;FeeType&quot; : &quot;FixedClosingFee&quot;,
                &quot;FeeAmount&quot; : {
                  &quot;CurrencyCode&quot; : &quot;USD&quot;,
                  &quot;CurrencyAmount&quot; : 25.37
                }
              } ],
              &quot;SellerSKU&quot; : &quot;456454455464&quot;,
              &quot;FnSKU&quot; : &quot;Fn134&quot;,
              &quot;FeeDescription&quot; : &quot;FeeDescription&quot;,
              &quot;ASIN&quot; : &quot;KJHJ457648GHD&quot;
            } ]
          }
        }
      }
    } ]
  }
}';
            $result = $this->testHelper->extractRequestAndResponse(
                $this->apiInstance,
                $jsonSchema,
                'listFinancialEventsByOrderId'
            );
            $requestParams = $result['requestParams'];
            $expectedResponse = $result['expectedResponse'];

            // Change Time Format if it requires
            $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('DefaultApi');
            if ($specificTimeFormat) {
                ObjectSerializer::setDateTimeFormat($specificTimeFormat);
            }

            // Act: Call API
            list($response, $statusCode, $headers) =
                $this->apiInstance->listFinancialEventsByOrderIdWithHttpInfo(...array_values($requestParams));

            // Assert the response code
            $this->assertHttpStatusCode(200, $statusCode);

            // Handle different response codes
            $this->handleResponse($response, $statusCode, 200, $expectedResponse);
        } catch (ApiException $e) {
            $this->handleApiException($e, 200);
        } catch (\ReflectionException $e) {
            $this->fail("Reflection exception: " . $e->getMessage());
        }
    }
    /**
     * Test case for listFinancialEventsByOrderId_400
     */
    public function testListFinancialEventsByOrderId400()
    {
        try {
            // Skip test if it is in the skip list
            if ($this->testHelper->shouldSkipTest('testListFinancialEventsByOrderId400', 'DefaultApi')) {
                $this->assertTrue(true);
                return;
            }
            $jsonSchema = '{
  &quot;description&quot; : &quot;Request has missing or invalid parameters and cannot be parsed.&quot;,
  &quot;headers&quot; : {
    &quot;x-amzn-RequestId&quot; : {
      &quot;description&quot; : &quot;Unique request reference identifier.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    },
    &quot;x-amzn-RateLimit-Limit&quot; : {
      &quot;description&quot; : &quot;Your rate limit (requests per second) for this operation.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    }
  },
  &quot;content&quot; : {
    &quot;application/json&quot; : {
      &quot;schema&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/ListFinancialEventsResponse&quot;
      }
    }
  },
  &quot;x-amzn-api-sandbox&quot; : {
    &quot;static&quot; : [ {
      &quot;request&quot; : {
        &quot;parameters&quot; : {
          &quot;orderId&quot; : {
            &quot;value&quot; : &quot;BAD-ORDER&quot;
          }
        }
      },
      &quot;response&quot; : {
        &quot;errors&quot; : [ {
          &quot;code&quot; : &quot;InvalidInput&quot;,
          &quot;message&quot; : &quot;Bad order ID provided.&quot;
        } ]
      }
    } ]
  }
}';
            $result = $this->testHelper->extractRequestAndResponse(
                $this->apiInstance,
                $jsonSchema,
                'listFinancialEventsByOrderId'
            );
            $requestParams = $result['requestParams'];
            $expectedResponse = $result['expectedResponse'];

            // Change Time Format if it requires
            $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('DefaultApi');
            if ($specificTimeFormat) {
                ObjectSerializer::setDateTimeFormat($specificTimeFormat);
            }

            // Act: Call API
            list($response, $statusCode, $headers) =
                $this->apiInstance->listFinancialEventsByOrderIdWithHttpInfo(...array_values($requestParams));

            // Assert the response code
            $this->assertHttpStatusCode(400, $statusCode);

            // Handle different response codes
            $this->handleResponse($response, $statusCode, 400, $expectedResponse);
        } catch (ApiException $e) {
            $this->handleApiException($e, 400);
        } catch (\ReflectionException $e) {
            $this->fail("Reflection exception: " . $e->getMessage());
        }
    }
    /**
     * Test case for listFinancialEventsByOrderId_403
     */
    public function testListFinancialEventsByOrderId403()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventsByOrderId_404
     */
    public function testListFinancialEventsByOrderId404()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventsByOrderId_429
     */
    public function testListFinancialEventsByOrderId429()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventsByOrderId_500
     */
    public function testListFinancialEventsByOrderId500()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for listFinancialEventsByOrderId_503
     */
    public function testListFinancialEventsByOrderId503()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
}
